---
id: 65823b0167fd894f4a7ea60a
title: Step 15
challengeType: 20
dashedName: step-15
---

# --description--

Next, you are going to implement the same logic to the `total_expenses` function.

For now, delete both the `test` function and the `print()` call.

# --hints--

You should delete your `test` variable.

```js
({ test: () => assert.notMatch(code, /test\s*=/) })
```

You should delete your `print(sum(map(test, [2, 3, 5, 8])))` call.

```js
({ test: () => assert.notMatch(code, /print\s*\(\s*sum/) })
```

# --seed--

## --seed-contents--

```py
def add_expense(expenses, amount, category):
    expenses.append({'amount': amount, 'category': category})

def print_expenses(expenses):
    for expense in expenses:
        print(f'Amount: {expense["amount"]}, Category: {expense["category"]}')

def total_expenses(expenses):
    pass

--fcc-editable-region--
test = lambda x: x * 2
print(sum(map(test, [2, 3, 5, 8])))
--fcc-editable-region--

expenses = []
```
